home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML ConsoleMax.sea / XML ConsoleMax / Required / swingall.jar / javax / swing / text / rtf / RTFReader$DocumentDestination.class (.txt) < prev    next >
Encoding:
Java Class File  |  1999-07-15  |  1.6 KB  |  37 lines

  1. package javax.swing.text.rtf;
  2.  
  3. import javax.swing.text.AttributeSet;
  4. import javax.swing.text.BadLocationException;
  5.  
  6. class RTFReader$DocumentDestination extends RTFReader.TextHandlingDestination implements RTFReader.Destination {
  7.    // $FF: synthetic field
  8.    private final RTFReader this$0;
  9.  
  10.    RTFReader$DocumentDestination(RTFReader var1) {
  11.       super(var1);
  12.       this.this$0 = var1;
  13.    }
  14.  
  15.    public void deliverText(String var1, AttributeSet var2) {
  16.       try {
  17.          this.this$0.target.insertString(this.this$0.target.getLength(), var1, ((RTFReader.AttributeTrackingDestination)this).currentTextAttributes());
  18.       } catch (BadLocationException var4) {
  19.          throw new InternalError(((Throwable)var4).getMessage());
  20.       }
  21.    }
  22.  
  23.    public void endSection() {
  24.    }
  25.  
  26.    public void finishParagraph(AttributeSet var1, AttributeSet var2) {
  27.       int var3 = this.this$0.target.getLength();
  28.  
  29.       try {
  30.          this.this$0.target.insertString(var3, "\n", var2);
  31.          this.this$0.target.setParagraphAttributes(var3, 1, var1, true);
  32.       } catch (BadLocationException var5) {
  33.          throw new InternalError(((Throwable)var5).getMessage());
  34.       }
  35.    }
  36. }
  37.